package com.yjd.user.service.impl;

import com.yjd.user.entity.User;
import com.yjd.user.service.ILoginService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * 登陆服务实现
 * Created by yangchangyan@yijiedai.com on 2018-12-25 14:33.
 */
@Service("loginService")
public class LoginServiceImpl implements ILoginService {

  Logger logger = LoggerFactory.getLogger(getClass());

  @Override
  public User login(String username, String password) throws Exception {
    logger.info("user:{} login success with password:{}", username, password);
    User user = new User();
    user.setUsername(username);
    user.setGender(1);
    user.setLoginTime(System.currentTimeMillis());
    return user;
  }
}
